package com.smzd.ccms.business;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.smzd.ccms.dao.CompletParamDao;
import com.smzd.ccms.domain.CompletParam;
import com.smzd.core.dao.IDao;
import com.smzd.framework.core.business.AbstractFGService;
import com.smzd.framework.utils.db.FGRowConverter;

@Service
public class CompletParamService extends AbstractFGService<CompletParam> {
    @Autowired
    private CompletParamDao dao;
    
    @Override
    protected IDao<CompletParam> getDao() {
        return dao;
    }
    
    @Override
    public FGRowConverter<CompletParam> getConverter() {
        return converter;
    }

    private static FGRowConverter<CompletParam> converter = new FGRowConverter<CompletParam>() {
        @Override
        public Object[] convert(CompletParam elem) {
            Object[] fs = new Object[]{
                    elem.getId(),
                    elem.getName(),
                    elem.getDescription(),
                    elem.getKey(),
                    elem.getValue(),
                    elem.getType()
                };
                return fs;
        }
    };
    
}